#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from email.mime.text import MIMEText
msg = MIMEText('hello, send by Python...', 'plain', 'utf-8')

# 输入Email地址和口令:
from_addr = 'liaoxiaojun@aspirecn.com'
password = 'lxj!@#125'
# 输入收件人地址:
to_addr = 'chenxiaozhang@aspirecn.com'
# 输入SMTP服务器地址:
smtp_server = 'smtp.mail.139.com'

import smtplib
server = smtplib.SMTP(smtp_server, 25) # SMTP协议默认端口是25
server.set_debuglevel(1)
server.login(from_addr, password)
server.sendmail(from_addr, [to_addr], msg.as_string())
server.quit()






